<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>提交记录</title>
</head>
<body>
<h1>提交记录</h1>
<table border="1">
    <tr>
        <td>用户</td>
        <td>题目</td>
        <td>状态</td>
        <td>提交时间</td>
    </tr>
    <tr th:each="record:${records}">
        <td th:text="${record.username}"></td>
        <td ><a th:text="${record.problemtitle}" th:href="${'/problem/'+record.problemid}"></a></td>
        <td th:text="${record.status}"></td>
        <td th:text="${record.sendtime}"></td>
    </tr>
</table>
<table>
    <tr>
        <td ><a th:if="${nowPage gt 0}" th:href="@{'/record/list?problemid=' + ${problemid} + '&page=' + ${nowPage-1} }">上一页</a></td>
        <td th:text="@{'第'+${nowPage+1}+'页'}"></td>
        <td ><a th:if="${nowPage lt totalPage-1}" th:href="@{'/record/list?problemid='+ ${problemid} + '&page=' + ${nowPage+1} }">下一页</a></td>
    </tr>
</table>
<a th:if="${isAdmin eq 'YES'}" href="/adminhomepage">主页</a>
<a th:if="${isAdmin eq 'NO'}" href="/userhomepage">主页</a>
</body>
</html>